import junit.framework.TestCase;

public class JUnitSolverData extends TestCase {

	public static void main(String[] args) {
		junit.textui.TestRunner.run(JUnitSolverData.class);
	}

	/** Test method for 'SolverData.setalltrue()'*/
	public void testSetalltrue()
	{
		//Test Setalltrue
		SolverData n = new SolverData();
		n.setalltrue();
		for(int i = 0; i < 9; i++)
		{
			assertTrue(n.getCell(i));
		}
		//Test Setallfalse
		n.setallfalse();
		for(int i = 0; i < 9; i++)
		{
			assertFalse(n.getCell(i));
		}
	}

	/** Test method for 'SolverData.getOnePoss(int)'*/
	public void testGetOnePoss()
	{
		SolverData n = new SolverData();
		n.setalltrue();
		for(int i = 0; i < 8; i++)
		{
			n.setfalse(i);
		}
		assertEquals(n.getOnePoss(1),9);
	}

	/** Test method for 'SolverData.getPoss()'*/
	public void testGetPoss()
	{
		SolverData n = new SolverData();
		n.setalltrue();
		for(int i = 0; i < 4; i++)
		{
			n.setfalse(i);
		}
		assertEquals(n.getPoss(),5);
	}

	/** Test method for 'SolverData.print()'*/
	public void testPrint()
	{
		SolverData n = new SolverData();
		n.setalltrue();
		n.setfalse(3);
		assertEquals(n.print(),"{true,true,true,false,true,true,true,true,true}");
	}

	/** Test method for 'SolverData.getCell(int)'*/
	public void testGetCell()
	{
		SolverData n = new SolverData();
		n.setalltrue();
		n.setfalse(4);
		assertFalse(n.getCell(4));
	}

}
